/*
 * ActionShowWidget.h
 *
 *  Created on: 2015-9-23
 *      Author: 10095427
 */

#ifndef ACTIONSHOWWIDGET_H_
#define ACTIONSHOWWIDGET_H_

#include "cocos2d.h"
USING_NS_CC;

typedef enum {
	ActionShowWidgetTypeNone,
	ActionShowWidgetTypeTransferBlack,
	ActionShowWidgetTypeMax,

} ActionShowWidgetType;

typedef std::function<void(Ref*)> actionShowWidgetCallback;

class ActionShowWidget : public cocos2d::Layer{
public:
	CC_SYNTHESIZE_READONLY(int , m_type, Type);
	ActionShowWidget();
	virtual ~ActionShowWidget();
    static ActionShowWidget *create(int type);
    bool init(int type);
    void setCallback(const actionShowWidgetCallback& callback);
protected:
    actionShowWidgetCallback m_callback;
private:
    void actionInit();
    const char* getFileByType();
    void actionEndCallback(Node *node);
};

#endif /* ACTIONSHOWWIDGET_H_ */
